/*
 * Copyright (c) 2017. Visionet and/or its affiliates. All right reserved.
 * VISIONET PROPRIETARY/CONFIDENTIAL.
 */
package com.visionet.jumper.core.domain.search.filter;

import com.visionet.jumper.core.domain.search.enumdata.JoinType;
import com.visionet.jumper.core.exception.runtime.FrameworkException;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.NotNull;

/**
 * @author TC.Ubuntu
 * @since 2017/12/27.
 */
public class SqlJoinTable extends JoinTableCondition {

	public SqlJoinTable(String joinTableName, String joinAliasName, JoinType joinType,
			String mainColName, String joinColName) {
		if(StringUtils.isBlank(mainColName) || StringUtils.isBlank(joinColName)) {
			throw new FrameworkException("关联列名不能为空");
		}
		super.join(joinTableName, joinAliasName);
		setJoinType(joinType);
		getJoinCondition().put(mainColName, joinColName);
	}

}
